home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7415 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: access1.digex.net!not-for-mail
  2. From: ell@access1.digex.net (Ell)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: HELP!  cin.getline to cin
  5. Date: 23 Feb 1996 02:46:54 GMT
  6. Organization: The Universe
  7. Message-ID: <4gj9qu$s92@news4.digex.net>
  8. References: <4gfnb0$2a6@daily-planet.execpc.com>
  9. NNTP-Posting-Host: access1.digex.net
  10. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  11.  
  12. Sherri Scalish (scalish@execpc.com) wrote:
  13. : I am a C++ student trying to use the cin.getline and cin stream 
  14. : operators to load in user input.  The data I am loading is first 
  15. : character strings, then floats, integers, then back to character 
  16. : strings.  Everything works fine with my cin.getlines until after I use 
  17. : the cin to load a integer or float, then nothing happens when I try to 
  18. : use the cin.getline function for the rest of the input.  Any ideas to 
  19. : share with me?
  20.  
  21. Get the input line using cin.getline() and then use the isalnum(c) and
  22. isdidgit(c) functions in ctype.h to parse the line.  Probably the easiest 
  23. way to do this, imo.
  24.  
  25. Elliott
  26.